Python: undefined reference to `_imp __Py_InitModule4'

Posted by Mark on Stack Overflow See other posts from Stack Overflow or by Mark
Published on 2010-05-16T03:15:12Z Indexed on 2010/05/16 3:20 UTC
Read the original article Hit count: 350

Filed under:

I'm trying to do a debug build of the Rabbyt library using mingw's gcc to run with my MSVC built python26_d.. I got a lot of undefined references which caused me to create libpython26_d.a, however one of the undefined references remains. Googling gives me:

http://www.techlists.org/archives/programming/pythonlist/2003-03/msg01035.shtml

But -rdynamic doesn't help.

e:\MinGW/bin\gcc.exe -mno-cygwin -mdll -O -Wall -g -IE:\code\python\python\py26\
include -IE:\code\python\python\py26\PC -c rabbyt/rabbyt._rabbyt.c -o build\temp
.win32-2.6-pydebug\Debug\rabbyt\rabbyt._rabbyt.o -O3 -fno-strict-aliasing
rabbyt/rabbyt._rabbyt.c:1351: warning: '__Pyx_SetItemInt' defined but not used
writing build\temp.win32-2.6-pydebug\Debug\rabbyt\_rabbyt_d.def

e:\MinGW/bin\gcc.exe -mno-cygwin -shared -g build\temp.win32-2.6-pydebug\Debug\r
abbyt\rabbyt._rabbyt.o build\temp.win32-2.6-pydebug\Debug\rabbyt\_rabbyt_d.def -
LE:\code\python\python\py26\libs -LE:\code\python\python\py26\PCbuild -lopengl32
 -lglu32 -lpython26_d -lmsvcr90 -o build\lib.win32-2.6-pydebug\rabbyt\_rabbyt_d.
pyd
build\temp.win32-2.6-pydebug\Debug\rabbyt\rabbyt._rabbyt.o: In function `init_ra
bbyt':

E:/code/python/rabbyt/rabbyt/rabbyt._rabbyt.c:1121: undefined reference to `_imp
__Py_InitModule4'

© Stack Overflow or respective owner

Related posts about python